<form class="layui-form layui-card">
    <div class="layui-card-body" style="padding-top: 20px;height: 100%" id="media">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <table class="layui-table">
                    <tr>
                        <th>学生姓名</th>
                        {foreach $attendance as $k1=>$v1}
                        <th>{$v1.day}</th>
                        {/foreach}
                    </tr>
                    {foreach $attendance_student_arr as $k2=>$v2}
                        <tr>
                            {foreach $v2 as $k3=>$v3}
                            <td>{$v3}</td>
                            {/foreach}
                        </tr>
                    {/foreach}
                </table>
            </div>
        </div>
        <input type='hidden' value='{$vo.id}' name='id'>
        <div class="layui-form-item text-center">
            <button type="button" data-export-list class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-export"></i>导 出</button>
        </div>
    </div>
</form>
{block name="script"}
<script>
    window.form.render();
    $('[data-export-list]').on('click', function () {
        window.location.href = '{:url("@")}?s={:url("export_attendance",false,false)}&' + $(this).parents('form').serialize()
    });
</script>
{/block}